package com.example.springboot.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Integer code;//状态 1成功 0失败
    private String msg;//描述
    private Object date;//数据

    public static Result success(){
        return new Result(1,"success",null);
    }
    public static Result success(Object date ){
        return new Result(1,"success",date);
    }
    public static Result error(String msg){
        return new Result(0,msg,null);
    }
}
